fix: correct sindi n_candidate error message and doc - #2709
Open
biaozy wants to merge 1 commit into
Open
Conversation
Signed-off-by: biao.zhoub <biao.zhoub@alibaba-inc.com>
biaozy
requested review from
LHT129,
inabao,
jiaweizone and
wxyucs
as code owners
August 18, 2026 06:25
Collaborator
|
/label status/waiting-for-review |
Contributor
Merge Protections🔴 2 of 2 protections blocking · waiting on 🙋 you
🔴 Require kind labelWaiting for
This rule is failing.
🔴 Require version labelWaiting for
This rule is failing.
|
Author
|
Hi maintainers, could you please add |
Collaborator
|
/kind bug |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix: correct sindi n_candidate error message and doc
Fixes: #2708
Description
The
SINDI::KnnSearchparameter check validatesn_candidateagainstSPARSE_AMPLIFICATION_FACTOR * k(500x), but the error message printedAMPLIFICATION_FACTOR * k(100x). This mismatch misleads users when tuning the parameter.Additionally, the SINDI documentation stated that
n_candidate = 0defaults toSPARSE_AMPLIFICATION_FACTOR * topk(500x), which does not match the actual implementation. The code usesef = max(n_candidate, k), so the default candidate heap size istopk.Changes
src/algorithm/sindi/sindi.cpp: useSPARSE_AMPLIFICATION_FACTORin the error message.docs/docs/en/src/indexes/sindi.md: correct the description ofn_candidatedefault behavior and allowed range.docs/docs/zh/src/indexes/sindi.md: sync the Chinese documentation.tests/test_sindi.cpp: add a test verifying that the error message matches the actual limit (500 * k).Testing
make releasein thevsaglib/vsag:ubuntuDocker development image.n_candidate = 500 * ksucceeds, andn_candidate = 500 * k + 1fails with a message containing"should be less than 500 * k".make fmtandmake lint; no new issues introduced.Checklist